package uk.ac.bath.machine.bool;

import uk.ac.bath.base.Operator;
import uk.ac.bath.base.Value;
import uk.ac.bath.base.VectorState;

abstract class UnaryOperator extends Operator {

    public void tick(VectorState in,VectorState out) {
        eval(in.at(1),out.at(0));
    }

    public void tick(VectorState in,VectorState out,int map[]) {
        eval(in.v[map[1]],out.v[map[0]]);
    }


    public int getStateSize() {
        return 2;
    }


    abstract public void eval(Value a,Value result);
    abstract public Object clone();
}
